(defun c:setallpages ()
(foreach n (layoutlist)
  (setvar "ctab" n)
  (if SetCurrentPageSetup NIL (LOAD "SetCurrentPageSetup"))
  (SetCurrentPageSetup (vla-get-activedocument (vlax-get-acad-object)) "TIFF 34x22 288dpi PS")
)
)